Skip to content

Metrics migration#180

Open
rslater-cs wants to merge 20 commits intomigration-basefrom
metrics-migration
Open

Metrics migration#180
rslater-cs wants to merge 20 commits intomigration-basefrom
metrics-migration

Conversation

@rslater-cs
Copy link
Contributor

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Description

  • Migrated the metrics service to use the new version of fibers
  • Metrics now has annotations for functions and types
  • Logic and state is now separate from pipelines to reduce pipeline cloning
  • Metrics configs are now done via metric name rather than endpoint, cutting down on pipeline reuse
  • Changed bus API to fit new runtime proposal
  • Added test utils
    • Fibers clock can now be manually moved forwards instead of sleeping for time dependent tests
    • A time harness uses ticks (instances of a yield) as a timeout instead of actual time, this removes system specific failures due to timeout being missed and makes time based tests deterministic
  • I have tests for cases where manual testing is either not possible or would take more time than just making the tests (verifying filter logic for example)

Manual test

  • 👍 yes
  • 🙅 no

Manual test description

Add the correct cloud url into the config.json
Comment line 481 and un-comment line 482 to make sure the metrics service does not lock due to missing time service
Run new devicecode with
DEVICECODE_CONFIG_DIR=./configs/ DEVICECODE_SERVICES=config,hal,gsm,metrics luajit main.lua
Check grafana for metrics being sent up

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 docs/specs/metrics.md
  • 🙅 no documentation needed

@rslater-cs rslater-cs requested review from corp0529 and cpunt March 24, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant